#include "GameObject.h"

void GameObject::Align(int _align)
{
	if(_align & (1 << 0))
		phyObj.center.x = position.width;
	else if(_align & (1 << 1))
		phyObj.center.x = position.width + size.width;
	else if(_align & (1 << 2))
		phyObj.center.x = position.width + (size.width*0.5F);

	if(_align & (1 << 3))
		phyObj.center.y = position.height;
	else if(_align & (1 << 4))
		phyObj.center.y = position.height + size.height;
	else if(_align & (1 << 5))
		phyObj.center.y = position.height + (size.height*0.5F);
}

void GameObject::Align(D2D1_POINT_2F _center)
{
	phyObj.center = _center;
}